Problem Note 39800: The COMPGED function ignores case sensitivity when used with CALL COMPCOST and the PUNCTUATION operation
The CALL COMPCOST routine sets the costs of operations for later use by the COMPGED function.
When the CALL COMPCOST routine uses the PUNCTUATION operation and a value of zero, the COMPGED function ignores case sensitivity and returns the wrong value for the generalized edit distance.
This was discovered in SAS 9.2, but additional testing found that it also existed back in SAS 9.1.3.
At this time there is no fix for the behavior.
Click the Full Code tab and the Results tab to see this behavior.
Operating System and Release Information
SAS System | Base SAS | z/OS | 9.1 TS1M3 | 9.3 TS1M0 |
Microsoft® Windows® for 64-Bit Itanium-based Systems | 9.1 TS1M3 | 9.3 TS1M0 |
Microsoft Windows Server 2003 Datacenter 64-bit Edition | 9.1 TS1M3 | 9.3 TS1M0 |
Microsoft Windows Server 2003 Enterprise 64-bit Edition | 9.1 TS1M3 | 9.3 TS1M0 |
Microsoft Windows XP 64-bit Edition | 9.1 TS1M3 | 9.3 TS1M0 |
Microsoft Windows Server 2003 Datacenter Edition | 9.1 TS1M3 | 9.3 TS1M0 |
Microsoft Windows Server 2003 Enterprise Edition | 9.1 TS1M3 | 9.3 TS1M0 |
Microsoft Windows Server 2003 Standard Edition | 9.1 TS1M3 | 9.3 TS1M0 |
Microsoft Windows XP Professional | 9.1 TS1M3 | 9.3 TS1M0 |
Windows Vista | 9.1 TS1M3 | 9.3 TS1M0 |
Windows Vista for x64 | 9.1 TS1M3 | 9.3 TS1M0 |
64-bit Enabled AIX | 9.1 TS1M3 | 9.3 TS1M0 |
64-bit Enabled HP-UX | 9.1 TS1M3 | 9.3 TS1M0 |
64-bit Enabled Solaris | 9.1 TS1M3 | 9.3 TS1M0 |
HP-UX IPF | 9.1 TS1M3 | 9.3 TS1M0 |
Linux | 9.1 TS1M3 | 9.3 TS1M0 |
OpenVMS Alpha | 9.1 TS1M3 | 9.3 TS1M0 |
Tru64 UNIX | 9.1 TS1M3 | 9.3 TS1M0 |
*
For software releases that are not yet generally available, the Fixed
Release is the software release in which the problem is planned to be
fixed.
You can run this in 9.1.3 or 9.2 to see the results or you can click on the results tab.
Data _null_ ;
STRING1 = "baboon" ;
STRING2 = "BABOON" ;
/* 1st comparison => OK */
GED1 = compged(STRING1,STRING2) ; /* take in care case */
GED2 = compged(STRING1,STRING2,20,"i") ; /* not take in care case */
put "BEFORE COMPCOST " STRING1= STRING2= GED1= GED2= ; /* GED1 = 700 , GED2 = 0 */
/* 2nd comparison => KO
COMPCOST is used to ignore punctuation, but in fact it ignores case too.
*/
call compcost("PUNCTUATION=",0) ;
GED3 = compged(STRING1,STRING2) ;
GED4 = compged(STRING1,STRING2,"i") ;
put "AFTER COMPCOST " STRING1= STRING2= GED3= GED4= ; /* GED3 = 0 whereas it should be 700 */
run ;
Log :
BEFORE COMPCOST STRING1=baboon STRING2=BABOON GED1=700 GED2=0
AFTER COMPCOST STRING1=baboon STRING2=BABOON GED3=0 GED4=0
Type: | Problem Note |
Priority: | medium |
Date Modified: | 2011-05-31 16:43:42 |
Date Created: | 2010-05-27 10:09:19 |